{% extends "base.html" %}

{% block content %}
    <h2>编辑积分记录</h2>
    <form method="POST">
        <div class="mb-3">
            <label for="account" class="form-label">账号</label>
            <input type="text" class="form-control" id="account" name="account" value="{{ score.account }}" required>
        </div>
        <div class="mb-3">
            <label for="date" class="form-label">日期</label>
            <input type="date" class="form-control" id="date" name="date" value="{{ score.date }}" required>
        </div>
        <div class="mb-3">
            <label for="balance" class="form-label">余额积分</label>
            <input type="number" class="form-control" id="balance" name="balance" value="{{ score.balance }}" required>
        </div>
        <div class="mb-3">
            <label for="transaction" class="form-label">交易量积分</label>
            <input type="number" class="form-control" id="transaction" name="transaction" value="{{ score.transaction }}" required>
        </div>
        <div class="mb-3">
            <label for="consumption" class="form-label">消耗积分</label>
            <input type="number" class="form-control" id="consumption" name="consumption" value="{{ score.consumption }}" required>
        </div>
        <div class="mb-3">
            <label for="remark" class="form-label">备注</label>
            <textarea class="form-control" id="remark" name="remark" rows="3">{{ score.remark }}</textarea>
        </div>
        <button type="submit" class="btn btn-primary">更新</button>
        <a href="/" class="btn btn-secondary">取消</a>
    </form>
{% endblock %}
